package com.gydtrade.appweb.system.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @ClassName: CommonController
 * @Description: TODO
 * @author: gydtrade
 * @Date: 2023-10-10 00:42
 * @Version: V1.0.0
 */
@Slf4j
@Controller
public class CommonController {
    /*@RequestMapping({"/"})
    public String index(Model model){
        return "index";
    }*/

    @RequestMapping({"/", "/index.html"})
    public String front_index(Model model){
        model.addAttribute("navbar", "index");
        return "front/index";
    }

    @RequestMapping({"/about.html"})
    public String about(Model model){
        model.addAttribute("navbar", "about");
        return "front/about";
    }

    @RequestMapping({"/product.html"})
    public String product(Model model){
        model.addAttribute("navbar", "product");
        return "front/product";
    }

    @RequestMapping({"/case.html"})
    public String case_page(Model model){
        model.addAttribute("navbar", "case");
        return "front/case";
    }

    @RequestMapping({"/service.html"})
    public String service(Model model){
        model.addAttribute("navbar", "service");
        return "front/service";
    }

    @RequestMapping({"/contact.html"})
    public String contact(Model model){
        model.addAttribute("navbar", "contact");
        return "front/contact";
    }

    @RequestMapping({"/join_us.html"})
    public String join_us(Model model){
        model.addAttribute("navbar", "join_us");
        return "front/join_us";
    }

    @RequestMapping({"/advantages.html"})
    public String advantages(Model model){
        model.addAttribute("navbar", "index");
        return "front/index";
    }

    @RequestMapping({"/agreement.html"})
    public String agreement(Model model){
        model.addAttribute("navbar", "index");
        return "front/index";
    }

    @RequestMapping({"/disclaimer.html"})
    public String disclaimer(Model model){
        model.addAttribute("navbar", "index");
        return "front/index";
    }

    @RequestMapping({"/agent.html"})
    public String agent(Model model){
        model.addAttribute("navbar", "index");
        return "front/index";
    }

    @RequestMapping({"/help.html"})
    public String help(Model model){
        model.addAttribute("navbar", "index");
        return "front/index";
    }

    @RequestMapping({"/admin", "/login.html"})
    public String sys_index(Model model){
        return "system/login";
    }
}
